package com.daocao.hua.model;

import android.os.Parcel;
import android.os.Parcelable;

import com.google.gson.annotations.SerializedName;

import java.util.ArrayList;
import java.util.List;

/**
 * Created by xsooy-pc on 18-7-11.
 */

public class RetrievePasswordV3Model extends ResponseModel implements Parcelable {


    /**
     * status : 00
     * message : 成功
     * datas : {"mode_list":[{"mode":"email","value":"502***@qq.com 502***@qq.com;3****************5","str_value":"如果您的502***@qq.com 502***@qq.com账户邮箱还在使用，且记得所留证件号码3****************5，请选择此方式。"},{"mode":"mobile","value":"184****9862","str_value":"如果您的184****9862 手机还在正常使用，请选择此方式。"},{"mode":"mibao","value":"","str_value":"如果您记得预留的安全保护问题，请选择此方式。"}],"ctoken":"03bf83060e474b95a99042162db97e13"}
     */
    public DatasBean data;

    public static class DatasBean implements Parcelable {
        /**
         * mode_list : [{"mode":"email","value":"502***@qq.com 502***@qq.com;3****************5","str_value":"如果您的502***@qq.com 502***@qq.com账户邮箱还在使用，且记得所留证件号码3****************5，请选择此方式。"},{"mode":"mobile","value":"184****9862","str_value":"如果您的184****9862 手机还在正常使用，请选择此方式。"},{"mode":"mibao","value":"","str_value":"如果您记得预留的安全保护问题，请选择此方式。"}]
         * ctoken : 03bf83060e474b95a99042162db97e13
         */

        public String ctoken;
        public ArrayList<ModeListBean> mode_list;

        public static class ModeListBean implements Parcelable {
            /**
             * mode : email
             * value : 502***@qq.com 502***@qq.com;3****************5
             * str_value : 如果您的502***@qq.com 502***@qq.com账户邮箱还在使用，且记得所留证件号码3****************5，请选择此方式。
             */

            public String mode;
            public String value;
            public String str_value;

            @Override
            public int describeContents() {
                return 0;
            }

            @Override
            public void writeToParcel(Parcel dest, int flags) {
                dest.writeString(this.mode);
                dest.writeString(this.value);
                dest.writeString(this.str_value);
            }

            public ModeListBean() {
            }

            protected ModeListBean(Parcel in) {
                this.mode = in.readString();
                this.value = in.readString();
                this.str_value = in.readString();
            }

            public static final Creator<ModeListBean> CREATOR = new Creator<ModeListBean>() {
                @Override
                public ModeListBean createFromParcel(Parcel source) {
                    return new ModeListBean(source);
                }

                @Override
                public ModeListBean[] newArray(int size) {
                    return new ModeListBean[size];
                }
            };
        }

        @Override
        public int describeContents() {
            return 0;
        }

        @Override
        public void writeToParcel(Parcel dest, int flags) {
            dest.writeString(this.ctoken);
            dest.writeList(this.mode_list);
        }

        public DatasBean() {
        }

        protected DatasBean(Parcel in) {
            this.ctoken = in.readString();
            this.mode_list = new ArrayList<ModeListBean>();
            in.readList(this.mode_list, ModeListBean.class.getClassLoader());
        }

        public static final Creator<DatasBean> CREATOR = new Creator<DatasBean>() {
            @Override
            public DatasBean createFromParcel(Parcel source) {
                return new DatasBean(source);
            }

            @Override
            public DatasBean[] newArray(int size) {
                return new DatasBean[size];
            }
        };
    }

    @Override
    public int describeContents() {
        return 0;
    }

    @Override
    public void writeToParcel(Parcel dest, int flags) {
        dest.writeParcelable(this.data, flags);
    }

    public RetrievePasswordV3Model() {
    }

    protected RetrievePasswordV3Model(Parcel in) {
        this.data = in.readParcelable(DatasBean.class.getClassLoader());
    }

    public static final Parcelable.Creator<RetrievePasswordV3Model> CREATOR = new Parcelable.Creator<RetrievePasswordV3Model>() {
        @Override
        public RetrievePasswordV3Model createFromParcel(Parcel source) {
            return new RetrievePasswordV3Model(source);
        }

        @Override
        public RetrievePasswordV3Model[] newArray(int size) {
            return new RetrievePasswordV3Model[size];
        }
    };
}
